<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">
        <span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
    </button>
    <h4 class="modal-title">图片信息编辑</h4>
</div>
{{ Form::open(array('url' => '/picture/edit', 'role' => 'form', 'id' => 'picture-edit', 'files' => true)) }}
<div class="modal-body">
    {{ Form::hidden('picture_id', $pictureInfo->id) }}
    <div class="form-group">
        {{ Form::label('name', '标题') }} {{ Form::text('name', $pictureInfo->name, array('class' => 'form-control')) }}
    </div>
    <div class="form-group">
        {{ Form::label('description', '描述') }} {{ Form::textarea('description', $pictureInfo->description, array('class' => 'form-control', 'rows' => 3)) }}
    </div>
    <div class="form-group">
        {{ Form::label('categories', '分类') }}
        <select id="categories" class="form-control" name="category_id">
            <option value="1">未分类</option>
            {{ $renderCategories }}
        </select>
    </div>
    <div class="form-group">
        {{ Form::label('tags', '标签') }} {{ Form::text('tags', $pictureInfo->tags, array('class' => 'form-control')) }}
    </div>
    <div class="form-group" id="price-change">
        {{ Form::label('tags', '定价') }}
        <div class="row">

            <div class="col-sm-6">
                <select class="form-control col-sm-6">
                    <option value="0" {{ ($pictureInfo->price == 0 || $pictureInfo->price == '')?'selected="selected"': '' }}>免费提供</option>
                    <option value="30" {{ $pictureInfo->price == 30?'selected="selected"': '' }}>A类定价（30元）</option>
                    <option value="60" {{ $pictureInfo->price == 60?'selected="selected"': '' }}>B类定价（60元）</option>
                    <option value="90" {{ $pictureInfo->price == 90?'selected="selected"': '' }}>C类定价（90元）</option>
                    @if($pictureInfo->price != 0 && $pictureInfo->price != 30 && $pictureInfo->price != 60 && $pictureInfo->price != 90)
                    <option value="100" selected="selected">自定义</option>

                    @else
                    <option value="100">自定义</option>
                    @endif
                </select>
            </div>

            <div class="form-group col-sm-6">
                <div class="input-group">
                    <div class="input-group-addon">¥</div>
                    <input class="form-control" name="price" type="text" placeholder="00" value="{{ $pictureInfo->price }}">
                </div>
            </div>
        </div>
    </div>
    @if(Auth::user()->role == 1)
    <div class="checkbox">
    	<label>{{ Form::checkbox('publish_index', 'publish', $pictureInfo->publish_index) }} 是否推荐到首页</label>
    </div>
    @endif
</div>
<div class="modal-footer">
    {{ Form::submit('保存', array('class' => 'btn btn-primary')) }}
</div>
{{ Form::close() }}
